<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>输入提示后查询</title>
    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
</head>
<body>
<div id="container" style="width: 0;"></div>
<div id="myPageTop" style="width: 100%; text-align: center; border: 0;">
    <label style="display: block; width: 100%;padding-bottom: 10px;font-size: 20px;margin-left:7%">请输入景点名称</label>
    <input style="display: block; width: 90%; padding-left:10px ; margin: 0 auto; border-radius: 20px;font-size: 18px;margin-left:7%" id="tipinput"/>
</div>
<script type="text/javascript">
    window._AMapSecurityConfig = {
      securityJsCode: "3879c5487751ec3569ca82273d49f804",
    };
</script>
<script
        type="text/javascript"
        src="https://webapi.amap.com/maps?v=2.0&key=b84d35a04218b181f4154561070f44a6"
></script>
<script type="text/javascript">
    
    //地图加载
    var map = new AMap.Map("container", {
        resizeEnable: true
    });
    //输入提示
    var autoOptions = {
        input: "tipinput"
    };
    var locationItem=''
    AMap.plugin(['AMap.PlaceSearch','AMap.AutoComplete'], function(){
        
        var auto = new AMap.AutoComplete(autoOptions);
        var placeSearch = new AMap.PlaceSearch({
            map: map
        });  //构造地点查询类
        auto.on("select", select);//注册监听，当选中某条记录时会触发
        function select(e) {
            
            locationItem=e.poi.name
          
        }
    }); 
    
    function executeMessage(){
        window.mapSelect.selectLocation(locationItem)
    }


   

</script>
</body>
</html>